From 4285560946cbae265361d82b374333ccdafc0df1 Mon Sep 17 00:00:00 2001 From: Jan Heller Date: Tue, 3 Jun 2008 12:12:36 +0000 Subject: [PATCH] Added babl_get_version () to the public API. 2008-06-03 Jan Heller Added babl_get_version () to the public API. * babl/Makefile.am: Added babl-version.h to library_include_HEADERS. * babl/babl-version.h.in: Added macros to expand to babl version information. * babl/babl.c (babl_get_version): Implemented. * babl/babl.h: Include babl-version.h, declare babl_get_version (). * configure.ac: Added babl-version.h to AC_CONFIG_FILES. svn path=/trunk/; revision=318 --- ChangeLog | 11 +++++++++++ babl/Makefile.am | 3 ++- babl/babl.c | 15 +++++++++++++++ babl/babl.h | 6 ++++++ configure.ac | 1 + 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index efc8eff..e250c8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-06-03 Jan Heller + + Added babl_get_version () to the public API. + + * babl/Makefile.am: Added babl-version.h to library_include_HEADERS. + * babl/babl-version.h.in: Added macros to expand to babl version + information. + * babl/babl.c (babl_get_version): Implemented. + * babl/babl.h: Include babl-version.h, declare babl_get_version (). + * configure.ac: Added babl-version.h to AC_CONFIG_FILES. + 2008-05-23 Jan Heller * extensions/sse-fixups.c (init): Fixed conditionally compiled code. diff --git a/babl/Makefile.am b/babl/Makefile.am index 771fb2c..c9efede 100644 --- a/babl/Makefile.am +++ b/babl/Makefile.am @@ -54,7 +54,8 @@ library_include_HEADERS = \ babl-image.h \ babl-model.h \ babl-sampling.h \ - babl-type.h + babl-type.h \ + babl-version.h INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/babl/base diff --git a/babl/babl.c b/babl/babl.c index 97ec6fc..d672c75 100644 --- a/babl/babl.c +++ b/babl/babl.c @@ -74,3 +74,18 @@ babl_destroy (void) babl_memory_sanity (); } } + +void +babl_get_version (int *major, + int *minor, + int *micro) +{ + if (major != NULL) + *major = BABL_MAJOR_VERSION; + + if (minor != NULL) + *minor = BABL_MINOR_VERSION; + + if (micro != NULL) + *micro = BABL_MICRO_VERSION; +} diff --git a/babl/babl.h b/babl/babl.h index 9547c8f..bf46ef0 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -81,6 +81,11 @@ void babl_init (void); */ void babl_destroy (void); +/** Get the version information on the babl library */ +void babl_get_version (int *major, + int *minor, + int *micro); + #if __GNUC__ >= 4 #define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__)) #else @@ -141,6 +146,7 @@ const char * babl_name (const Babl *babl); void babl_introspect (Babl *babl); /* introspect a given BablObject */ +#include "babl-version.h" #include "babl-type.h" #include "babl-sampling.h" #include "babl-component.h" diff --git a/configure.ac b/configure.ac index b9c4671..8dc52f1 100644 --- a/configure.ac +++ b/configure.ac @@ -386,6 +386,7 @@ AC_CONFIG_FILES( Makefile babl.pc babl/Makefile +babl/babl-version.h babl/base/Makefile docs/Makefile docs/index-static.html -- 2.30.2